Data compression is often used for reducing the cost of storing large data files on computers as well as reducing the time to transmit large data files between computers. In the so-called “transform methods” data is transformed into coefficients that represent the data in a frequency domain. Coefficients may be quantized (lossy compression), and redundancy in the quantized coefficients may then be reduced or eliminated (lossless compression).
JPEG is a standardized image compression algorithm. JPEG compression of an image includes dividing the image into a grid of non-overlapping 8×8 blocks of pixels, and independently coding each pixel block. The coding of each pixel block includes taking a two-dimensional Discrete Cosine Transform (DCT) to obtain an 8×8 block of DCT coefficients; and quantizing the DCT coefficients. The quantization exploits the following: the low frequency DCT coefficients contain most of the image energy; sensitivity limits of the human visual system vary with spatial frequency (e.g., small high frequency changes are perceived less accurately than small low frequency changes); and the human visual system is much more sensitive to high frequency variations in luminance than similar variations in color.
The image may be reconstructed by performing an inverse DCT transform on the quantized coefficients. Because the coefficients are quantized, the reconstructed image does not contain all of the information of the original image (that is, the image prior to compression). Consequently, the reconstructed image is not identical to the original image.
Moreover, the reconstructed image can contain artifacts that were not present in the original image. For example, compare FIGS. 2a and 2b, which are images of a sliced fruit against a textured background. FIG. 2a shows the sliced fruit and textured background prior to JPEG compression. Notice the gradual change in color of the textured background, and the crisp edges between the sliced fruit and the background.
FIG. 2b shows the sliced fruit and textured background after the image was JPEG-compressed and thereafter decompressed. Now notice the background texture of the decompressed image. Instead of texture, there appear groups of blocks of different shades (each 8×8 DCT block is smoothed to a single shade). These artifacts are referred to as “blocking” artifacts. In addition, the edges of the sliced fruit are no longer crisp. Echoes or shadows appear at the edges. These artifacts at the edges are referred to as “ringing” artifacts.
The blocking and ringing artifacts can degrade image quality. They are especially prominent if the JPEG-compression was performed at a low bit rate (i.e., a highly compressed image).
It is desirable to reduce the artifacts in decompressed images.